package cn.hxh.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author: HongXiaoHan
 * @Description
 * @Date: 2020/8/20 11:18
 */
public class ForWardServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        //转发学习 (记住转发的/是在当前服务器的默认路径   没有多级路径的情况下不要加入项目名的路径)
        req.getRequestDispatcher("success.jsp").forward(req,resp);



    }
}
